package com.mj.mafeed.activity;

import com.mj.mafeed.R;
import com.mj.mafeed.util.AppUtils;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;

/**
 * 关于App
 * @author zhaominglei
 * @date 2016-2-29
 * 
 */
public class AboutActivity extends Activity implements OnClickListener {
	@SuppressWarnings("unused")
	private static final String TAG = AboutActivity.class.getSimpleName();
	private ImageView goHome;
	private TextView appversion; //版本号
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_about);
		
		init();
	}
	
	private void init() {
		goHome = (ImageView)findViewById(R.id.about_gohome);
		appversion = (TextView)findViewById(R.id.about_appversion);
		
		goHome.setOnClickListener(this);
		appversion.setText("版本号 "+AppUtils.getVersionName(getApplicationContext()));
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.about_gohome:
			AboutActivity.this.finish();
			break;

		default:
			break;
		}
	}

	@Override
	public void onBackPressed() {
		AboutActivity.this.finish();
	}
}
